% MRQFIT - nonlinear curve fitter
%
%    [FP, CHISQ, NITER] = MRQFIT("exponential", P, X, Y) fits an
%    exponential function to the data specified by X and Y.  The
%    parameter vector P is of the form [A0 A1 T1 A2 T2 ... AN TN]
%    to fit the data with the sum of N exponentials having time
%    constants Ti and amplitudes Ai.  The parameters found by the
%    minimization algorithm are returned to FP, the fit chi^2
%    normalized by the D.O.F. is returned to CHISQ, and the
%    number of iterations is returned to NITER.
%
%    [...] = MRQFIT("boltzmann", P, X, Y) fits a Boltzmann function
%    to the data specified by X and Y.  The parameter vector P is
%    of the form [A0 A1 K1 X1 K2 X2 ... KN XN] to fit the data with
%    the sum of N Boltzmanns having slopes Ki and half-activation
%    points of Xi.
%
%    [...] = MRQFIT("gaussian", P, X, Y) fits a Gaussian function
%    to the data specified by X and Y.  The parameter vector P is
%    of the form [A0 A1 M1 S1 A2 M2 S2 ... AN MN SN] to fit the
%    data with the sum of N Gaussians having amplitudes Ai, means
%    Mi, and standard deviations Si.
%    
%    [...] = MRQFIT(F, P, X, Y, SIG, VP, LB, UB, IMAX, TOL) provides
%    additional parameters to control the minimization algorithm.
%    Pass an empty array [] for any of these values to use the
%    default values.
%
%    SIG provides standard deviations for each data value in Y.
%    The default is 1.
%
%    VP indicates which parameters vary.  The default is all vary.
%
%    LB and UB provide lower and upper bounds on the fit parameters
%    (the default is none).  Use NaN or Inf to specify parameters
%    without lower or upper bounds.  The default is no bounds.
%
%    IMAX is a scalar containing the maximum number of iterations.
%    The default is 25.
%
%    TOL is a scalar containing the chi^2 convergence tolerance.
%    The default is 1.0e-3.
% 
%    [FP, CHISQ, NITER, FITC, ERR, DEP] = MRQFIT(...) returns the
%    resulting fit FCN(P, X) evaluated at each X (FITC), the number
%    of successful iterations (NITER), the estimated error on each
%    fit parameter (ERR), and the fit parameter dependencies (DEP).

% By:   S.C. Molitor (smolitor@bme.jhu.edu)
% Date: February 25, 1999

% MEX file.
